home *** CD-ROM | disk | FTP | other *** search
/ Atari Mega Archive 1 / Atari Mega Archive - Volume 1.iso / cli / okami15.lzh / OKAMI15 / CALC.SH < prev    next >
Text File  |  1992-09-20  |  831b  |  42 lines

  1. # Shellscript: Okami-Shell UPN-Rechner
  2. # @(#) calc.sh von wr 12.8.90 - 4.5.91
  3.  
  4. _=0.0
  5.  
  6. # Programmvariablen für Binominalkoeffizienten und Summe 1..x
  7. # (siehe tricks.doc)
  8. BKOEFF="2 sto 1 sto 1 rcl fact 2 rcl fact 1 rcl 2 rcl - fact * /"
  9. SUM="dup sqr + 2 /"
  10.  
  11. # English readers un-comment the following lines:
  12. #echo ^033pOkami-Shell RPN calculator^033q^n
  13. #echo Type ^`help^' for command survey.
  14. #echo Type ^`exit^' to finish.
  15. #PROMPT=rpn
  16.  
  17. # and comment the following lines:
  18. echo ^033pOkami-Shell UPN-Rechner^033q^n
  19. echo Hilfe durch Eingabe von ^`help^'.
  20. echo Ende durch Eingabe von ^`exit^'.
  21. PROMPT=upn
  22.  
  23. while true
  24. do
  25.   echo "$PROMPT ^> "^c
  26.   read - UPN
  27.   if [ -v UPN ]        # Leerzeile
  28.   then
  29.     continue
  30.   fi
  31.   if [ $UPN = exit ]
  32.   then
  33.     break
  34.   fi
  35.  
  36.   upn $UPN
  37.   _=$?
  38.  
  39. done
  40.  
  41. unset UPN PROMPT
  42.